package com.test.jdk;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by houjinxin on 16/9/26.
 */
public class HeapOOM {

    static class OOMObject {

        public static void main(String[] args) {

            List<OOMObject> list = new ArrayList<OOMObject>();

            while (true) {

                list.add(new OOMObject());
            }
        }
    }
}